package com.bee.oa.service.sm.impl;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import com.bee.base.entity.Page;
import com.bee.oa.dao.sm.ResourceDao;
import com.bee.oa.dao.sm.XDao;
import com.bee.oa.domain.sm.Resource;
import com.bee.oa.domain.sm.X;
import com.bee.oa.service.sm.ResourceService;

public class ResourceServiceImpl implements ResourceService {

	private ResourceDao resourceDao;
	private XDao xDao;

	public void setResourceDao(ResourceDao resourceDao) {
		this.resourceDao = resourceDao;
	}

	public void setxDao(XDao xDao) {
		this.xDao = xDao;
	}

	public List<X> findX(String queryString, Object... values) {
		return xDao.find(queryString, values);
	}

	@Override
	public Serializable save(Resource entity) {
		return resourceDao.save(entity);
	}

	@Override
	public void saveAll(Collection<Resource> entities) {
		resourceDao.saveAll(entities);
	}

	@Override
	public Resource get(Long sid) {
		return resourceDao.get(sid);
	}

	@Override
	public List<Resource> find(String queryString, Object... values) {
		return resourceDao.find(queryString, values);
	}

	@Override
	public List<Resource> find(Resource entity) {
		return resourceDao.find(entity);
	}

	@Override
	public List<Resource> find(Map<String, String> params) {
		return resourceDao.find(params);
	}

	@Override
	public List<Resource> findAll() {
		return resourceDao.findAll();
	}

	@Override
	public void update(Resource entity) {
		resourceDao.update(entity);
	}

	@Override
	public void updateAll(Collection<Resource> entities) {
		resourceDao.updateAll(entities);
	}

	@Override
	public void delete(Resource entity) {
		resourceDao.delete(entity);
	}

	@Override
	public void delete(Long sid) {
		resourceDao.delete(sid);
	}

	@Override
	public void deleteAll(Collection<Resource> entities) {
		resourceDao.deleteAll(entities);
	}

	@Override
	public Page page(String queryString, int pageNo, int pageSize) {
		return resourceDao.page(queryString, pageNo, pageSize);
	}

	@Override
	public Page page(Map<String, String> params, int pageNo, int pageSize) {
		return resourceDao.page(params, pageNo, pageSize);
	}

}
